package shop.data;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class DBUlti {
	public static void closeStatement(Statement s){
		try {
			if(s!=null){
				s.close();
			}
		} catch (SQLException e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}
	public static void closePreparedStatement(Statement ps){
		try {
			if(ps!=null){
				ps.close();
			}
		} catch (SQLException e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}
	public static void closeResultSet(ResultSet rs){
		try {
			if(rs!=null){
				rs.close();
			}
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}
}
